[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
setlocale() Set the Locale
#include <locale.h>
char *setlocale(categ, char *locale);
int categ; The category (see below)
char *locale; New locale
This function lets you select a locale from these arguments for
categ:
LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY
LC_NUMERIC LC_TIME
Note that C++ supports only the "C" locale, so using
this function has no effect.
Returns: If successful, setlocale() returns a string
indicating the previous locale. Otherwise, setlocale()
returns a null pointer.
-------------------------------- Example ---------------------------------
This program sets the locale to the only one C++ supports,
the C locale.
#include <locale.h>
#include <stdio.h>
int main(void)
{
setlocale(LC_ALL,"C");
return 0;
}
See Also:
localeconv()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson